﻿#include "debug.h"
#include "usart.h"
#include "stdio.h"

/**
 * @brief  重定向printf函数
 */
int fputc(int ch, FILE *f)
{
    while(usart_flag_get(USART0, USART_FLAG_TBE) == RESET);
    usart_data_transmit(USART0, (uint16_t)ch);
    return ch;
}
